package za.ac.wits.elen7045.persistence.model;

public enum AccountType {

	MUNICIPALITY			("MUN"),
	CREDIT_CARD_PROVIDER	("CCP"),
	TELCO_SERVICE_PROVIDER	("TSP"),
	OTHER					("OTH");
	
	public static AccountType getAccountTypeByCode(String code) {
		for (AccountType accountType : values()) {
			if (accountType.getCode().equals(code)) {
				return accountType;
			}
		}
		return null;
	}
	
	private AccountType(String code) {
		this.code = code;
	}
	
	public String getCode() {
		return code;
	}
	
	private String code;
	
}
